<?php
include_once 'classes/controls/Form.php';
include_once 'classes/controls/SubmitButton.php';
class LogoutForm extends Form{
	function RunBeforeValidate(){
		
		unset($_SESSION["isAuthenticated"]);
	}
	function CustomValidate() {
		
	}
	function NextWizardPage() {
		header ("Location:".$_SERVER["SCRIPT_NAME"]);
	}
	function StoreData() {

	}
	function DisplayForm(){

		$name = $this->FieldPrefix.$this->Name;
		$submitFunc = $name."Submit()";
	?>
<script type="text/javascript">
function <?php echo $submitFunc?>
{
  document.<?php echo $name ?>.submit();
}
</script>
<form name="<?php echo $name?>" action="<?php echo $_SERVER["SCRIPT_NAME"]?>" method="POST">
<?php $this->Additional()?>
<!--<a href="javascript:<?php echo $submitFunc?>"></a>-->
<?php new SubmitButton($this,'Logout','Logout')?>
</form>

	<?php
	}
}
?>